<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app">
        <functional-child></functional-child>
    </div>
    <script src="vue.js"></script>
    <script>
        var vm = new Vue({
            el:'#app',
            data:{msg:'我是父组件上的消息'},
            components:{
                'functional-child':{
                    functional:true,
                    render(createElement,context){
                        console.log(createElement)
                        console.log(context)
                        return createElement('div',`这是从父组件是获取的消息${context.parent.msg}`);
                    }   
                }
            } 
        });
    </script>
</body>
</html>